package com.tianhui.consignortwofei.mvp.ui.activity.deliverGoods;

import com.fgs.common.CommonFragment;
import com.fgs.common.CommonPresenter;
import com.fgs.common.CommonView;
import com.fgs.common.other.CommonEvent;
import com.tianhui.consignortwofei.R;
import com.tianhui.consignortwofei.base.BaseActivity;
import com.tianhui.consignortwofei.mvp.ui.activity.MainActivity;
import com.tianhui.consignortwofei.other.EventWhat;
import com.tianhui.consignortwofei.role.RoleController;

import org.greenrobot.eventbus.EventBus;

import butterknife.OnClick;

/**
 * @author fgs
 * @date 2020/9/9
 * @description
 **/
public class DeliverGoodsSuccessActivity extends BaseActivity {


    @Override
    public int getLayoutId() {
        return R.layout.activity_deliver_goods_success;
    }

    @Override
    public CommonPresenter createPresenter() {
        return null;
    }

    @Override
    public CommonView createView() {
        return null;
    }

    @Override
    public String getToolbarTitle() {
        return "发布成功";
    }

    @Override
    public void init() {

    }

    @Override
    public void onBackIconClick() {
        super.onBackIconClick();
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_ORDER_LIST.getValue()));
    }

    @Override
    public CommonFragment createFragment() {
        return null;
    }

    @OnClick(R.id.activity_deliver_goods_success_manageButton)
    public void manageSource() {
        RoleController.getInstance().manageSourceOperate();
        finish();
    }

    @OnClick(R.id.activity_deliver_goods_success_backButton)
    public void goBackHome() {
        EventBus.getDefault().post(new CommonEvent(EventWhat.EVENT_REFRESH_ORDER_LIST.getValue()));
        openActivity(MainActivity.class);
    }
}
